﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="companyList.aspx.cs" Inherits="WebSite.admin.company.companyList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head2" runat="server">
    <title>福利点点通 </title>
    <link href="../css/skin.css" rel="stylesheet" type="text/css" />
    <script src="../js/common.js" type="text/javascript"></script>
</head>
<body>
    <form id="form2" runat="server">
       <div class="maincontent">
        <%= HeaderHtml %>
       <ext:PageManager ID="PageManager1" runat="server" />
      <ext:SimpleForm ID="extForm1" runat="server" BodyPadding="5px"   
            EnableBackgroundColor="false" Title="商品列表"  ShowHeader="true" >
              <Items>

            <ext:Panel ID="Panel2" ShowHeader="false"  CssClass="x-form-item" ShowBorder="false" Layout="Column" runat="server">

             <Items>  
              <ext:Label ID="Label1"   runat="server" Text="&nbsp;&nbsp;省份："></ext:Label>
               <ext:DropDownList ID="ddlProvence"  runat="server" Width="100px"  Text="省份" 
                     ShowLabel="true" Label="省份"   AutoPostBack="true"
                     OnSelectedIndexChanged="ddlProvence_SelectedIndexChanged"></ext:DropDownList>
             <ext:Label ID="lblLevleResult"   runat="server" Text="&nbsp;&nbsp;筛选级别："></ext:Label>
               <ext:DropDownList ID="ddlLevleResult"  runat="server" Width="140px"  Text="筛选级别" AutoPostBack="true" 
                     ShowLabel="true" Label="筛选级别" 
                     OnSelectedIndexChanged="ddlLevleResult_SelectedIndexChanged"></ext:DropDownList>
                     <ext:Label ID="Label2"   runat="server" Text="&nbsp;&nbsp;商家类别："></ext:Label>
                        <ext:dropdownlist ID="ddlCompanyCategory" runat="server" Label="商家类别">
                          <ext:ListItem Text="所有"  Selected="true" Value="-1"></ext:ListItem>
                        <ext:ListItem Text="经销商" Value="0"></ext:ListItem>
                        <ext:ListItem Text="供货商" Value="1"></ext:ListItem>
                       
                    </ext:dropdownlist>
            <ext:Label ID="lblKeywords"  Width="60px"    runat="server" Text="&nbsp;&nbsp;关键字："></ext:Label>
            <ext:TextBox runat="server" ID="txtKeywords"   MaxLength="100" Label="关键字" ></ext:TextBox>
                   <ext:Button ID="btnSearch" Text="搜索"  CssClass="mleft mright" runat="server" 
                     OnClick="btnSearch_Click"></ext:Button>
                  </Items>
         </ext:Panel>

     </Items>
     
   </ext:SimpleForm>

   <ext:Panel ID="Panel8" ShowBorder="True" ShowHeader="false" BoxFlex="1"  CssClass="x-form-item"  Layout="Fit"
                runat="server">
                <Toolbars>
                    <ext:Toolbar ID="Toolbar2" runat="server">
                        <Items>
                           <ext:Button ID="btnBrachDeleted" runat="server" Text="批量删除"  OnClick="btnBrachDeleted_Click"
                            ConfirmTarget="self" ConfirmText="确定要删除选中的商品吗？" >
                         </ext:Button>
                        </Items>
                    </ext:Toolbar>
                </Toolbars>
                <Items>
    </Items>
    </ext:Panel>
         <ext:Grid ID="Grid1" Title="查询结果" PageSize="50" ShowBorder="false"  CssClass="x-form-item"  Height="418px"  AllowPaging="true" SortColumn="CompanyCode" SortDirection="ASC"     
                        OnPageIndexChange="Grid1_PageIndexChange" ShowHeader="False" runat="server" EnableCheckBoxSelect="True"   AllowSorting="true"    IsDatabasePaging="true" 
                        DataKeyNames="CompanyCode,Name" OnSort="Grid1_Sort" EnableRowNumber="True">

        <Columns>    
                 <ext:BoundField Width="100px" ColumnID="CompanyCode" SortField="CompanyCode" DataField="CompanyCode" DataFormatString="{0}"
                HeaderText="公司编号" />
         <ext:BoundField Width="180px" ColumnID="Name" SortField="Name" DataField="Name" DataFormatString="{0}"
                HeaderText="公司名称" />
          
             <ext:BoundField Width="100px" ColumnID="CompanyShortName" SortField="CompanyShortName" DataField="CompanyShortName" DataFormatString="{0}"
                HeaderText="公司简称" />
           <ext:BoundField Width="100px" ColumnID="LevelName" SortField="LevelId" DataField="LevelName" DataFormatString="{0}"
                HeaderText="级别" />
           <ext:BoundField Width="100px" ColumnID="Address" SortField="Address" DataField="Address" DataFormatString="{0}"
                HeaderText="公司地址" />
          <ext:BoundField Width="100px" ColumnID="Email" SortField="Email" DataField="Email" DataFormatString="{0}"
                HeaderText="Email" />
           <ext:BoundField Width="100px" ColumnID="CompanyManager" SortField="CompanyManager" DataField="CompanyManager" DataFormatString="{0}"
                HeaderText="公司负责人" />
          <ext:BoundField Width="100px" ColumnID="CompanyManagerMobile" SortField="CompanyManagerMobile" DataField="CompanyManagerMobile" DataFormatString="{0}"
                HeaderText="负责人电话" />
           <ext:BoundField Width="100px" ColumnID="Linker" SortField="Linker"  DataField="Linker" DataFormatString="{0}"
                HeaderText="联系人" />
         <ext:BoundField Width="100px" ColumnID="Telephone" SortField="Telephone"  DataField="Telephone" DataFormatString="{0}"
                HeaderText="联系电话" />
          <ext:TemplateField Width="120px" SortField="cardcode" HeaderText="操作">
                <ItemTemplate> 
                 <div style=" float:left;">

                       <div style="float:left; display:block;" id="divEdit" runat="server">     <a href="#" onclick="openNewTab('CompanyEdit','/admin/company/companyManager.aspx?id=<%# Eval("id") %>&ot=ed&type=<%= Request.QueryString["type"] %>','商家编辑-<%# Eval("CompanyShortName")%>','')"; title="编辑">[编辑]</a> </div>
                   <div style="float:left; display:block;" id="divDeleted" runat="server">  <a title="删除" href="companyList.aspx?action=del&amp;id=<%# Eval("id") %>" onclick="javascript:return confirm('确定要删除吗？');">[删除]</a></div>
                    <div style="float:left; display:block;" id="divCompanyUser" runat="server">  <a href="#" onclick="openNewTab('CompanyUser','/admin/company/CompanyUserList.aspx?id=<%# Eval("id") %>','商家用户中心-<%# Eval("CompanyShortName")%>','')"; title="用户">[用户]</a></div>
                 
                </div>
                </ItemTemplate>
            </ext:TemplateField>
        </Columns>
    </ext:Grid>
      </div>
    </form>
</body>
</html>


